This was the original addressing scheme devised for IP which divided the IP address space into classes, each dedicated to specific uses. Certain classes would be devoted to large networks on the Internet, while others would be assigned to smaller organisation, and yet others would be reserved for special purposes. Needless to say, this system has outlived its usefulness due to the huge number of hosts connected to the Internet at present day. Nevertheless, one should still be able to understand it.
There are 5 classes defined for this system and they are outlined in the table below:
Class | Portion of the Total IP Address Space | Number of Network ID bits | Number of Host ID bits | Use |
---|---|---|---|---|
Class A | 1/2 | 8 | 24 | Unicast addressing for very large organisations (hundreds of thousands to millions of hosts. |
Class B | 1/4 | 16 | 16 | Unicast addressing for medium-size organisations (hundreds to thousands of hosts). |
Class C | 1/8 | 24 | 8 | Unicast addressing for small organisations (no more than 250 hosts). |
Class D | 1/16 | N/A | N/A | IP Multicasting. |
Class E | 1/16 | N/A | N/A | Reserved for experimental use. |
The class an IP address belongs to is determined by its first four bits:
Since the beginning of every IP determines its class, each class is associated with a specific IP range.
Class | First Octet | Network ID / Host ID Octets | Theoretical Range |
---|---|---|---|
Class A | 0xxx xxxx | 1/3 | 1.0.0.0 - 126.255.255.255 |
Class B | 10xx xxxx | 2/2 | 128.0.0.0 - 191.255.255.255 |
Class C | 110x xxxx | 3/1 | 192.0.0.0 - 223.255.255.255 |
Class D | 1110 xxxx | N/A | 224.0.0.0 - 239.255.255.255 |
Class E | 1111 xxxx | N/A | 240.0.0.0 - 255.255.255.255 |
The provided ranges are solely theoretical due to the fact that many IP addresses are actually reserved and/or have special meanings.
The IP range from 127.0.0.0
to 127.255.255.255
is reserved for loopback addressing. Datagrams sent to an IP address in this range are not passed down to the data link layer and are instead directly "loop-ed back" to the host that sent them. In a sense, loopback addresses mean "me". Sending a datagram to such an address is equivalent as sending it to yourself.
While the most commonly used loopback address is 127.0.0.1
, any IP address in this range will result in the same functionality.